<!doctype html>
<html>
<head>
    <meta charset="UTF-8" name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no,X-Content-Type-Options=nosniff" http-equiv="Content-Type" />
    <meta http-equiv="X-UA-Compatible" content="IE=10" />
    <title>WorkPort</title>
    <link rel="icon" href="imgs/favicon.ico" type="image/x-icon" />
    <div id="wp_pre_load" style="display:none;"><img src="imgs/icons/blackLoading.gif"/><img src="imgs/icons/whiteLoading.gif"/></div>
    <link rel="shortcut icon" href="imgs/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="lib/kendo/styles/kendo.common-bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="lib/kendo/styles/kendo.bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="css/jquery.atwho.min.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/layout.css">
</head>
<body>
    <div id="global_alert_win">
        <p></p>
        <span class="btn no">Cancel</span>
        <span class="btn yes"></span>
    </div>
</body>    
    <script src="lib/kendo/js/jquery.min.js"></script>
    <script src="lib/kendo/js/kendo.all.min.js"></script>
    <script src="lib/kendo/js/jquery.transit.min.js"></script>
    <script src="lib/jquery.slimscroll.min.js"></script>
    <script src="lib/jquery.highlight.js"></script>
    <script src="lib/ZeroClipboard.min.js"></script>
    <script src="lib/jquery.caret.js"></script>
    <script src="lib/jquery.atwho.min.js"></script>
    <script src="js/svs.framework.js"></script>
    <script src="js/wp.js"></script>
    <script src="js/api.all.js"></script>
    <script src="js/app.api.js"></script>
    <script src="js/community.api.js"></script>
    <script src="js/stream.api.js"></script>
    <script src="js/tag.func.js"></script>
    <script src="js/tag.api.js"></script>
    <script src="js/multi.select.func.js"></script>
    <script src="js/share.email.multi.select.js"></script>
    <script type="text/javascript">
        $(function(){
            Workport.utils.loadPage('html/header.tmpl.html', 'wp_header');
            var div = document.createElement('div');
            div.id = 'wp_body';
            document.body.appendChild(div);
            $(div).load('html/homepage.tmpl.html', function(data) {
                $('#body_layout').find('.item').each(function(){
                    var self = $(this);
                    var loader = new Workport.Loader(self, LAYOUT_ITEM_CONFIG[self.prop('id')] || LAYOUT_ITEM_CONFIG.DEFAULT);
                    loader.show();
                });
                // setTimeout(function(){
                    Workport.utils.clearCount();
                    var parseURL = Workport.LocationManager.parseURL();
                    Workport.utils.startCount(function(page){
                        Workport.LocationManager.execute(parseURL);
                    });
                    Workport.utils.loadPage('html/homepage.profile.tmpl.html', 'wp_homepage_profile');
                    Workport.utils.loadPage('html/smartstream.tmpl.new.html', 'wp_homepage_smartstream');
                    Workport.utils.loadPage('html/smartstream.share.tmpl.html', 'wp_homepage_smartstream_share');
                    Workport.utils.loadPage('html/smartstream.topic.detail.tmpl.html', 'wp_homepage_smartstream_detail');
                    Workport.utils.loadPage('html/community.viewall.tmpl.html', 'wp_homepage_community_smartstream_viewall');
                    Workport.utils.loadPage('html/communities.profile.tmpl.html', 'wp_communities_profile_win');
                    Workport.utils.loadPage('html/iwantto.tmpl.html', 'wp_homepage_iwantto');
                    Workport.utils.loadPage('html/homepage.notifactions.tmpl.html', 'wp_homepage_notifactions');
                    Workport.utils.loadPage('html/documents.tmpl.html','wp_homepage_documents');
                    Workport.utils.loadPage('html/apps.tools.tmpl.html', 'wp_apps_tools');
                    Workport.utils.loadPage('html/apps.tools.register.tmpl.html', 'wp_apps_tools_register');
                    Workport.utils.loadPage('html/apps.tools.register.editlist_tmpl.html', 'wp_apps_tools_register_editlist');
                    Workport.utils.loadPage('html/applications.tools.create.tmpl.html', 'wp_apps_tools_create');
                    Workport.utils.loadPage('html/all.liked.users.list.win.tmpl.html', 'wp_all_like_users_list');
                    Workport.utils.loadPage('html/app.edit.list.tmpl.html', 'wp_app_edit');
                    Workport.utils.loadPage('html/iframe.window.html', 'wp_iframe_pop_win');
                    Workport.utils.loadPage('html/inbox.tmpl.html', 'wp_inbox_win');
                    Workport.utils.loadPage('html/communities.tmpl.html', 'wp_communities_win');
                    Workport.utils.loadPage('html/communities.nominate.experts.html', 'wp_communities_nominate_experts_win');
                    Workport.utils.loadPage('html/communities.create.tmpl.html', 'wp_communities_create');
                    Workport.utils.loadPage('html/applications.add.detail.tmpl.html', 'wp_apps_add_detail');
                    Workport.utils.loadPage('html/homepage.search.tmpl.html', 'wp_homepage_search');
                    Workport.utils.loadPage('html/contacts.main.tmpl.html', 'wp_contacts_main');
                    Workport.utils.loadPage('html/contacts.add.tmpl.html', 'wp_contacts_add');
                    // Workport.utils.loadPage('html/calendar.tmpl.html');
                    Workport.utils.loadPage('html/smartstream.share.email.tmpl.html', 'share_email_win');
                    Workport.utils.loadPage('html/box.tmpl.html', 'wp_box_win');
                // },5000);
                $(document).off('contextmenu');
                document.oncontextmenu = null;
            });
            console.log('load workport ver11.5');
        }());
    </script>
</html>